class TGBase:
    'Parent class for solvers that use Taylor-Galerkin stabilization.'
    def __init__(self,type,bcStrong):
        self.type = type # determines type of by-parts-integration
                         #!0 - boundary condition weakly
                         #!1 - no by-parts, no boundary conditions                                                      
                         #!2 - by-parts on diffusion term, surface term is kept, no boundary condition
                         #!3 - by-parts on diffusion term, surface term is omitted correspondind to inner(grad(phi),n)=0
        self.bcStrong = bcStrong if type is not 0 else 0      # for type 1,2,3 enforce boundary condition on flow strongly
        self.methodDir = 'tg_type=%d_bcStrong=%d' % (self.type,self.bcStrong)
